NVidia Driver: Unable to load nvidia 您所在的位置:网站首页 nvidia forums NVidia Driver: Unable to load nvidia

NVidia Driver: Unable to load nvidia

2023-05-02 00:36| 来源: 网络整理| 查看: 265

After two days trying to solve this, I've finally managed to install 440.82 with the latest kernel-native (custom built with SECTION_MISMATCH_WARN_ONLY). Perhaps nvidia or intel staff will clarify what's at fault here, but there is some problematic interaction between 5.6.15 kernel vs GCC 10.1 vs nvidia 440.92 installer in 1) creating the proper dkms build and source tree in "/var/lib/dkms/nvidia/440.82/" and 2) issuing the proper install command to the /usr/bin/dkms tool.

Using the following installation command (per https://docs.01.org/clearlinux/latest/tutorials/nvidia.html plus "--no-cc-version-check" just as a guarantee and "--expert" instead of "--silent" for a more verbose installation)

sudo ./NVIDIA-Linux-x86_64-440.82.run     --utility-prefix=/opt/nvidia     --opengl-prefix=/opt/nvidia     --compat32-prefix=/opt/nvidia     --compat32-libdir=lib32     --x-prefix=/opt/nvidia     --x-module-path=/opt/nvidia/lib64/xorg/modules     --x-library-path=/opt/nvidia/lib64     --x-sysconfig-path=/etc/X11/xorg.conf.d     --documentation-prefix=/opt/nvidia     --application-profile-path=/etc/nvidia/nvidia-application-profiles-rc.d     --no-precompiled-interface     --no-distro-scripts     --force-libglx-indirect     --glvnd-egl-config-path=/etc/glvnd/egl_vendor.d     --egl-external-platform-config-path=/etc/egl/egl_external_platform.d     --dkms     --no-cc-version-check     --expert

Using the "--expert" options reveals why the installer issues "ERROR: Unable to load the 'nvidia-drm' kernel module" without any explanation at all:

-> Driver file installation is complete. -> Installing DKMS kernel module: -> done. ERROR: Unable to load the 'nvidia-drm' kernel module: 'modprobe: ERROR: ctx=0x5646828152a0 path=/lib/modules/5.6.15-957.native/kernel/drivers/video/nvidia-modeset.ko error=No such file or directory modprobe: ERROR: ctx=0x5646828152a0 path=/lib/modules/5.6.15-957.native/kernel/drivers/video/nvidia-modeset.ko error=No such file or directory modprobe: ERROR: could not insert 'nvidia_drm': Unknown symbol in module, or unknown parameter (see dmesg)'

The DKMS kernel modules are being built, but they are not being finally installed from the proper build directory to the corresponding kernel modules path. That is why they are not being loaded by modprobe. ls /var/lib/dkms/nvidia/440.82/ reveals the following:

source/ build/

The correct source symlink directory pointing to the nvidia kernel modules sources. And the build symlink directory which after the successful build should hold the resulting binaries, make.log, etc. And that is not happening. build/ is an empty directory. The solution is to manually build and install the dkms nvidia source tree. Here is the fix, after rebuilding the kernel with "SECTION_MISMATCH_WARN_ONLY". Start by installing the driver again, this time with the --silent flag instead of the --expert flag:

sudo ./NVIDIA-Linux-x86_64-440.82.run     --utility-prefix=/opt/nvidia     --opengl-prefix=/opt/nvidia     --compat32-prefix=/opt/nvidia     --compat32-libdir=lib32     --x-prefix=/opt/nvidia     --x-module-path=/opt/nvidia/lib64/xorg/modules     --x-library-path=/opt/nvidia/lib64     --x-sysconfig-path=/etc/X11/xorg.conf.d     --documentation-prefix=/opt/nvidia     --application-profile-path=/etc/nvidia/nvidia-application-profiles-rc.d     --no-precompiled-interface     --no-distro-scripts     --force-libglx-indirect     --glvnd-egl-config-path=/etc/glvnd/egl_vendor.d     --egl-external-platform-config-path=/etc/egl/egl_external_platform.d     --dkms     --no-cc-version-check     --silent

Go to the same /var/lib/dkms/nvidia/440.82/ directory. Enter source/, where dkms.conf and Makefile is. Try this:

sudo dkms autoinstall

All nvidia modules will be successfully build, added and installed. ls /var/lib/dkms/nvidia/440.82/ will now correctly show a proper dkms compilation tree: source/ 5.6.15-957.native/

The kernel should be custom rebuild with SECTION_MISMATCH_WARN_ONLY (Kernel hacking -> Compile-time checks and compiler options -> Make section mismatch errors non-fatal), following the simple guide: https://docs.01.org/clearlinux/latest/guides/kernel/kernel-development.html. Remember to install the *-dev package of your newly custom built kernel as well: rpm2cpio linux-dev-5.6.15-957.x86_64.rpm | (cd /; sudo cpio -i -d -u -v);



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有